for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Redaxscript\Tests\Model;
use Redaxscript\Model;
use Redaxscript\Tests\TestCaseAbstract;
/**
* SearchTest
*
* @since 4.0.0
* @package Redaxscript
* @category Tests
* @author Henry Ruhs
* @covers Redaxscript\Model\Search
*/
class SearchTest extends TestCaseAbstract
{
* setUp
public function setUp() : void
parent::setUp();
$installer = $this->installerFactory();
$installer->init();
$installer->rawCreate();
}
* tearDown
public function tearDown() : void
$this->dropDatabase();
* testCreateColumnArray
* @param string $table
* @param array $expectArray
* @dataProvider providerAutoloader
public function testCreateColumnArray(string $table = null, array $expectArray = []) : void
/* setup */
$searchModel = new Model\Search();
/* actual */
$actualArray = $this->callMethod($searchModel, '_createColumnArray',
[
$table
]);
/* compare */
$this->assertEquals($expectArray, $actualArray);
* testCreateLikeArray
* @param string $search
public function testCreateLikeArray(string $table = null, string $search = null, array $expectArray = []) : void
$actualArray = $this->callMethod($searchModel, '_createLikeArray',
$table,
$search