Skip to content

Commit

Permalink
(test) update breaking tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesDPC committed Jun 22, 2023
1 parent 64eb556 commit 67361f0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/IframeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ class IframeTest extends SapphireTest
*/
public function setUp() : void {
parent::setUp();
Config::inst()->update(
Config::modify()->set(
ElementIframe::class,
'default_allow_attributes',
[
Expand All @@ -58,7 +58,7 @@ public function setUp() : void {
/** @var File $file */
$file = DataObject::get_by_id(File::class, $fileID);
$file->setFromString(str_repeat('x', 1000000), $file->getFilename());
$file->doPublish();
$file->publishSingle();
}

}
Expand Down Expand Up @@ -134,7 +134,7 @@ public function testIframe() {
$this->assertTrue($result !== false, "Expected integrity hash {$hash} is not present in requirements");
}

$iframe->doPublish();
$iframe->publishSingle();

$this->assertTrue($iframe->isPublished(), "Iframe is not published");

Expand All @@ -144,7 +144,7 @@ public function testIframe() {
$iframe->IsLazy = 0;
$iframe->Width = 600;
$iframe->write();
$iframe->doPublish();
$iframe->publishSingle();

$this->assertEquals(600, $iframe->getIframeWidth(), "Iframe width should now be 600");

Expand Down Expand Up @@ -222,7 +222,7 @@ public function testBCEmail() {

public function testBCPhone() {

Config::inst()->update( PhoneView::class, 'default_country', 'AU');
Config::modify()->set( PhoneView::class, 'default_country', 'AU');

$value = '+61-400-000-000';
$expected = 'tel:' . $value;
Expand All @@ -246,7 +246,7 @@ public function testBCPhone() {
}

public function testBCSiteTree() {
$expected = '/page-test/';
$expected = '/page-test';
$iframe = $this->objFromFixture( ElementIframe::class, 'bcsitetree');
$link = $iframe->URL();
$this->assertEquals('SiteTree', $link->Type);
Expand Down

0 comments on commit 67361f0

Please sign in to comment.