Fixed tests for Security
This commit is contained in:
parent
4e3e841b04
commit
041f8090b0
|
@ -22,11 +22,11 @@ class UniqueEmailAndNameUserFields extends AbstractMigration
|
|||
$user_table = $this->table('user');
|
||||
|
||||
if ($user_table->hasIndex('email', ['unique' => true])) {
|
||||
$user_table->removeIndex('email', ['unique' => true])->save();
|
||||
$user_table->removeIndex(['email'], ['unique' => true])->save();
|
||||
}
|
||||
|
||||
if ($user_table->hasIndex('name', ['unique' => true])) {
|
||||
$user_table->removeIndex('name', ['unique' => true])->save();
|
||||
$user_table->removeIndex(['name'], ['unique' => true])->save();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testBuildBuiltinProvider()
|
||||
{
|
||||
$provider = Service::buildProvider('test', ['internal' => ['type' => 'internal']]);
|
||||
$provider = Service::buildProvider('test', ['type' => 'internal']);
|
||||
|
||||
$this->assertInstanceOf('\PHPCensor\Security\Authentication\UserProvider\Internal', $provider);
|
||||
}
|
||||
|
@ -37,10 +37,10 @@ class ServiceTest extends \PHPUnit_Framework_TestCase
|
|||
*/
|
||||
public function testBuildAnyProvider()
|
||||
{
|
||||
$config = array('type' => '\PHPCensor\Security\Authentication\Tests\DummyProvider');
|
||||
$config = array('type' => '\Tests\PHPCensor\Security\Authentication\DummyProvider');
|
||||
$provider = Service::buildProvider("test", $config);
|
||||
|
||||
$this->assertInstanceOf('\PHPCensor\Security\Authentication\Tests\DummyProvider', $provider);
|
||||
$this->assertInstanceOf('\Tests\PHPCensor\Security\Authentication\DummyProvider', $provider);
|
||||
$this->assertEquals('test', $provider->key);
|
||||
$this->assertEquals($config, $provider->config);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue