Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove "Filter" from baked collections. #317

Merged
merged 1 commit into from
Feb 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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