Skip to content

Commit 752848c

Browse files
committed
tests
1 parent 2c02f82 commit 752848c

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

packages/framework/tests/Feature/FeaturedImageFactoryTest.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ public function testWithDataFromSchema()
4747
'copyrightText' => 'copyright',
4848
'licenseName' => 'license',
4949
'licenseUrl' => 'licenseUrl',
50+
'caption' => null,
5051
];
5152

5253
$factory = new FeaturedImageFactory(new FrontMatter($array));
@@ -178,7 +179,7 @@ public function testFallsBackToCaptionWhenAltIsMissing()
178179

179180
$image = FeaturedImageFactory::make(new FrontMatter($array));
180181

181-
$this->assertNull($image->altText);
182+
$this->assertFalse($image->hasAltText());
182183
$this->assertSame('This caption should be used as alt text', $image->getAltText());
183184
$this->assertSame('This caption should be used as alt text', $image->getCaption());
184185
}

packages/framework/tests/Unit/SchemaContractsTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,9 @@ public function testSchemasAreNotAccidentallyChanged()
6969
$this->assertSame([
7070
'source' => 'string',
7171
'altText' => 'string',
72+
'alt' => 'string',
7273
'titleText' => 'string',
74+
'caption' => 'string',
7375
'licenseName' => 'string',
7476
'licenseUrl' => 'string',
7577
'authorName' => 'string',

0 commit comments

Comments
 (0)