Skip to content

Commit

Permalink
Fix referencing nonexistent header theme properties (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
meszarosrob authored Nov 16, 2023
1 parent c3886c3 commit 43f4b3a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
14 changes: 7 additions & 7 deletions src/Properties/ThemeProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@ class ThemeProperties extends BaseProperties
*/
protected const HEADERS = [
self::PROP_AUTHOR => 'Author',
self::PROP_AUTHOR_URI => 'Author URI',
self::PROP_AUTHOR_URI => 'AuthorURI',
self::PROP_DESCRIPTION => 'Description',
self::PROP_DOMAIN_PATH => 'Domain Path',
self::PROP_NAME => 'Theme Name',
self::PROP_TEXTDOMAIN => 'Text Domain',
self::PROP_URI => 'Theme URI',
self::PROP_DOMAIN_PATH => 'DomainPath',
self::PROP_NAME => 'Name',
self::PROP_TEXTDOMAIN => 'TextDomain',
self::PROP_URI => 'ThemeURI',
self::PROP_VERSION => 'Version',
self::PROP_REQUIRES_WP => 'Requires at least',
self::PROP_REQUIRES_PHP => 'Requires PHP',
self::PROP_REQUIRES_WP => 'RequiresWP',
self::PROP_REQUIRES_PHP => 'RequiresPHP',

// additional headers
self::PROP_STATUS => 'Status',
Expand Down
18 changes: 9 additions & 9 deletions tests/unit/Properties/ThemePropertiesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function testBasic(): void
$expectedUri = 'http://github.com/inpsyde/modularity';
$expectedVersion = '1.0';
$expectedPhpVersion = "7.4";
$expecteWpVersion = "5.3";
$expectedWpVersion = "5.3";
$expectedStatus = 'publish';
$expectedTags = ['foo', 'bar'];

Expand All @@ -36,15 +36,15 @@ public function testBasic(): void

$values = [
'Author' => $expectedAuthor,
'Author URI' => $expectedAuthorUri,
'AuthorURI' => $expectedAuthorUri,
'Description' => $expectedDescription,
'Domain Path' => $expectedDomainPath,
'Theme Name' => $expectedName,
'Text Domain' => $expectedTextDomain,
'Theme URI' => $expectedUri,
'DomainPath' => $expectedDomainPath,
'Name' => $expectedName,
'TextDomain' => $expectedTextDomain,
'ThemeURI' => $expectedUri,
'Version' => $expectedVersion,
'Requires at least' => $expecteWpVersion,
'Requires PHP' => $expectedPhpVersion,
'RequiresWP' => $expectedWpVersion,
'RequiresPHP' => $expectedPhpVersion,
'Status' => $expectedStatus,
'Tags' => $expectedTags,
// No child-Theme.
Expand Down Expand Up @@ -78,7 +78,7 @@ public function testBasic(): void
static::assertSame($expectedTextDomain, $testee->textDomain());
static::assertSame($expectedUri, $testee->uri());
static::assertSame($expectedVersion, $testee->version());
static::assertSame($expecteWpVersion, $testee->requiresWp());
static::assertSame($expectedWpVersion, $testee->requiresWp());
static::assertSame($expectedPhpVersion, $testee->requiresPhp());

// specific methods for Themes.
Expand Down

0 comments on commit 43f4b3a

Please sign in to comment.