Skip to content

Commit

Permalink
Merge pull request #317 from FriendsOfCake/issue-315
Browse files Browse the repository at this point in the history
Remove "Filter" from baked collections.
  • Loading branch information
dereuromark authored Feb 16, 2022
2 parents 1ef5fe9 + 22f8411 commit 760d996
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/Command/Bake/FilterCollectionCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ public function name(): string
*/
public function fileName(string $name): string
{
return $name . 'FilterCollection.php';
return $name . 'Collection.php';
}

/**
Expand Down
2 changes: 1 addition & 1 deletion templates/bake/FilterCollection/filter_collection.twig
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace {{ namespace }};
use Search\Model\Filter\FilterCollection;
class {{ name }}FilterCollection extends FilterCollection
class {{ name }}Collection extends FilterCollection
{
/**
* @return void
Expand Down
8 changes: 4 additions & 4 deletions tests/TestCase/Command/Bake/FilterCollectionCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public function testEmpty()

$this->assertExitCode(BaseCommand::CODE_SUCCESS);

$file = $this->_generatedBasePath . 'EmptyFilterCollection.php';
$file = $this->_generatedBasePath . 'EmptyCollection.php';
$result = file_get_contents($file);
$this->assertSameAsFile(__FUNCTION__ . '.php', $result);
}
Expand All @@ -82,7 +82,7 @@ public function testDefault()

$this->assertExitCode(BaseCommand::CODE_SUCCESS);

$file = $this->_generatedBasePath . 'PostsFilterCollection.php';
$file = $this->_generatedBasePath . 'PostsCollection.php';
$result = file_get_contents($file);
$this->assertSameAsFile(__FUNCTION__ . '.php', $result);
}
Expand All @@ -96,7 +96,7 @@ public function testCustomName()

$this->assertExitCode(BaseCommand::CODE_SUCCESS);

$file = $this->_generatedBasePath . 'MyPostsFilterCollection.php';
$file = $this->_generatedBasePath . 'MyPostsCollection.php';
$result = file_get_contents($file);
$this->assertSameAsFile(__FUNCTION__ . '.php', $result);
}
Expand All @@ -110,7 +110,7 @@ public function testPrefix()

$this->assertExitCode(BaseCommand::CODE_SUCCESS);

$file = $this->_generatedBasePath . 'Admin/PrefixedPostsFilterCollection.php';
$file = $this->_generatedBasePath . 'Admin/PrefixedPostsCollection.php';
$result = file_get_contents($file);
$this->assertSameAsFile(__FUNCTION__ . '.php', $result);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Filter/testCustomName.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Search\Model\Filter\FilterCollection;

class MyPostsFilterCollection extends FilterCollection
class MyPostsCollection extends FilterCollection
{
/**
* @return void
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Filter/testDefault.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Search\Model\Filter\FilterCollection;

class PostsFilterCollection extends FilterCollection
class PostsCollection extends FilterCollection
{
/**
* @return void
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Filter/testEmpty.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Search\Model\Filter\FilterCollection;

class EmptyFilterCollection extends FilterCollection
class EmptyCollection extends FilterCollection
{
/**
* @return void
Expand Down
2 changes: 1 addition & 1 deletion tests/comparisons/Filter/testPrefix.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

use Search\Model\Filter\FilterCollection;

class PrefixedPostsFilterCollection extends FilterCollection
class PrefixedPostsCollection extends FilterCollection
{
/**
* @return void
Expand Down

0 comments on commit 760d996

Please sign in to comment.