Skip to content

Commit

Permalink
Add more tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
dereuromark committed Jan 4, 2024
1 parent c39f551 commit e3e5558
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
8 changes: 4 additions & 4 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Sandbox\Test\TestCase\Controller;

use Sandbox\Model\Entity\BitmaskedRecord;
use Shim\TestSuite\IntegrationTestCase;

/**
Expand Down Expand Up @@ -112,6 +113,30 @@ public function testBitmaskSearch() {
$this->assertNoRedirect();
}

/**
* @return void
*/
public function testBitmaskSearchFlag() {
$this->disableErrorHandlerMiddleware();

$this->get(['plugin' => 'Sandbox', 'controller' => 'ToolsExamples', 'action' => 'bitmaskSearch', '?' => ['flags' => BitmaskedRecord::STATUS_FEATURED]]);

$this->assertResponseCode(200);
$this->assertNoRedirect();
}

/**
* @return void
*/
public function testBitmaskSearchFlagMulti() {
$this->disableErrorHandlerMiddleware();

$this->get(['plugin' => 'Sandbox', 'controller' => 'ToolsExamples', 'action' => 'bitmaskSearch', '?' => ['flags' => [BitmaskedRecord::STATUS_FEATURED, BitmaskedRecord::STATUS_FLAGGED]]]);

$this->assertResponseCode(200);
$this->assertNoRedirect();
}

/**
* @return void
*/
Expand All @@ -124,4 +149,16 @@ public function testBitmasks() {
$this->assertNoRedirect();
}

/**
* @return void
*/
public function testBitmaskEnums() {
$this->disableErrorHandlerMiddleware();

$this->get(['plugin' => 'Sandbox', 'controller' => 'ToolsExamples', 'action' => 'bitmaskEnums']);

$this->assertResponseCode(200);
$this->assertNoRedirect();
}

}

0 comments on commit e3e5558

Please sign in to comment.