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

v2.1.0 #4

Merged
merged 38 commits into from
Jul 3, 2024
Merged
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
f1c59f7
add phpstan config #3
Mar 27, 2024
3f9e736
define php >=7.4, <8.4 requirement #3
Mar 27, 2024
931819e
do not keep composer.lock in repository #3
Mar 27, 2024
ae7fc37
code reformatting #3
Mar 27, 2024
36d32a9
various fixes for phpstan level9 code analysis #3
Apr 3, 2024
6f0a65a
fix wrong type for $linkModelName in FilteredBehavior #3
Apr 3, 2024
a276b32
fix testAfterDataFilterCallbackQueryChange unit test #3
Apr 3, 2024
0195e1e
Document2 and Document3 docblock for mixin and property #3
Apr 3, 2024
66db320
fix "Property FilteredBehaviorTest::$Document (Document|Document2|Doc…
Apr 3, 2024
6aab09e
ignore phpstan error "Access to an undefined property BehaviorCollect…
Apr 3, 2024
4bb36ce
fix "Method DocumentTestsController::redirect() should return CakeRes…
Apr 3, 2024
6369abb
fix "Property Document::$hasOne (array<int|string, array<string, mixe…
Apr 3, 2024
4bc83a4
add github automated testing workflow #3
Apr 3, 2024
6322868
fix automated php syntax check #3
Apr 3, 2024
0d12674
require "kba-team/cakephp" and "phpunit/phpunit" #3
Apr 8, 2024
baf61af
remove php7.4 compatibility #3
Apr 8, 2024
ac1bccc
set parent class to TestCase for FilterComponentTest #3
May 27, 2024
dbdfb5c
ignore .uuid files
gregor-j May 27, 2024
4598bba
add script to run tests inside docker container
gregor-j May 27, 2024
faab566
replace array braces with brackets in FilteredBehavior
gregor-j May 27, 2024
da58397
rename readme and add section testing to readme
gregor-j May 27, 2024
f3f1cac
add docker pull command to readme testing section
gregor-j May 27, 2024
c41144d
update usage in readme and code blocks
gregor-j May 27, 2024
cbf8f30
make test.sh configurable and add comments
gregor-j May 27, 2024
a6bbc62
remove the AllTest test suite as TestSuits don't exist in PHPUnit 9 a…
gregor-j May 27, 2024
706f220
change case class for FilteredBehaviorTest to \PHPUnit\Framework\Test…
May 27, 2024
b2d0904
WIP fix unit tests #3
May 28, 2024
fa9efa0
raise minimum PHP version to 8.1 #3
May 28, 2024
8b2b648
use exceptions instead of trigger_error #3
May 28, 2024
b88412a
WIP fix unit tests #3
May 28, 2024
34c653f
replace test script with phpunit script and before and after scripts
gregor-j May 29, 2024
1e27ad6
fixed testSessionStartupData in FilterComponentTest.php #3
May 29, 2024
ce74bd0
fixed testNoModelFound in FilterComponentTest.php #3
May 29, 2024
2047aab
fixed failing testCustomSelector test #3
gregor-j Jul 2, 2024
84942b0
ensure the mock object is used in testCustomSelector #3
gregor-j Jul 2, 2024
0acc82c
fix FilteredBehavior unit test #3
Jul 3, 2024
8a57505
use model mock objects in FilterComponentTest #3
Jul 3, 2024
41b78d5
ignore some phpstan findings #3
Jul 3, 2024
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
Prev Previous commit
Next Next commit
ensure the mock object is used in testCustomSelector #3
  • Loading branch information
gregor-j committed Jul 2, 2024
commit 84942b03614cbb1a0335f0c5dfc1a0bef90ef499
3 changes: 2 additions & 1 deletion Test/Case/Controller/Component/FilterComponentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@
try {
$this->Controller->Components->trigger('initialize', array($this->Controller));
$this->fail('InvalidArgumentException was not thrown');
} catch (InvalidArgumentException $e1) {

Check failure on line 205 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.2)

Dead catch - InvalidArgumentException is never thrown in the try block.

Check failure on line 205 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3)

Dead catch - InvalidArgumentException is never thrown in the try block.
$this->assertSame('Filter model not found: FakeNonexistant', $e1->getMessage());
}

$filterValues = array('Document' => array('title' => 'in'));

Check failure on line 209 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.2)

Unreachable statement - code above always terminates.

Check failure on line 209 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3)

Unreachable statement - code above always terminates.
$this->Controller->Session->write($sessionKey, $filterValues);

try {
Expand Down Expand Up @@ -297,11 +297,11 @@
try {
$this->Controller->Components->trigger('initialize', array($this->Controller));
$this->fail('InvalidArgumentException was not thrown');
} catch (InvalidArgumentException $e) {

Check failure on line 300 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.2)

Dead catch - InvalidArgumentException is never thrown in the try block.

Check failure on line 300 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3)

Dead catch - InvalidArgumentException is never thrown in the try block.
$this->assertSame('Filter model not found: ThisModelDoesNotExist', $e->getMessage());
}

$sessionKey = sprintf('FilterPlugin.Filters.%s.%s', $this->Controller->name, $this->Controller->action);

Check failure on line 304 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.2)

Unreachable statement - code above always terminates.

Check failure on line 304 in Test/Case/Controller/Component/FilterComponentTest.php

View workflow job for this annotation

GitHub Actions / phpstan (8.3)

Unreachable statement - code above always terminates.
$filterValues = array('ThisModelDoesNotExist' => array('title' => 'in'));
$this->Controller->Session->write($sessionKey, $filterValues);
try {
Expand Down Expand Up @@ -439,8 +439,9 @@
* ClassRegistry::init('DocumentCategory');
* in
* FilterComponent.php:216
* This line adds the mock object as model class for DocumentCategory.
* The following two lines adds the mock object as model class for DocumentCategory.
*/
App::uses('DocumentCategory', 'Filter.Test/Case/MockObjects');
ClassRegistry::addObject('document_category', new DocumentCategory());

$this->Controller->filters = $testSettings;
Expand Down
Loading