From 041f8090b0ccaab8d331149ada094716b02c9ccd Mon Sep 17 00:00:00 2001 From: Dmitry Khomutov Date: Sun, 8 Jan 2017 00:08:11 +0700 Subject: [PATCH] Fixed tests for Security --- .../20150324174958_unique_email_and_name_user_fields.php | 4 ++-- tests/PHPCensor/Security/Authentication/ServiceTest.php | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/PHPCensor/Migrations/20150324174958_unique_email_and_name_user_fields.php b/src/PHPCensor/Migrations/20150324174958_unique_email_and_name_user_fields.php index 8c1f4b7c..5a19ff16 100644 --- a/src/PHPCensor/Migrations/20150324174958_unique_email_and_name_user_fields.php +++ b/src/PHPCensor/Migrations/20150324174958_unique_email_and_name_user_fields.php @@ -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(); } } } diff --git a/tests/PHPCensor/Security/Authentication/ServiceTest.php b/tests/PHPCensor/Security/Authentication/ServiceTest.php index b29e5351..8042e6f1 100644 --- a/tests/PHPCensor/Security/Authentication/ServiceTest.php +++ b/tests/PHPCensor/Security/Authentication/ServiceTest.php @@ -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); }