diff --git a/composer.json b/composer.json index 05ec2ab..e4b4b7c 100644 --- a/composer.json +++ b/composer.json @@ -5,14 +5,14 @@ "license": "MIT", "type": "project", "require": { - "php": ">=7.1", - "adldap2/adldap2": "^10.1", - "illuminate/support": "~5.5|~6.0" + "php": ">=7.2", + "adldap2/adldap2": "dev-master", + "illuminate/support": "~7.0" }, "require-dev": { "mockery/mockery": "~1.0", - "phpunit/phpunit": "~7.0", - "orchestra/testbench": "~3.7" + "phpunit/phpunit": "~8.5", + "orchestra/testbench": "~5.0" }, "archive": { "exclude": ["/tests"] diff --git a/tests/DatabaseImporterTest.php b/tests/DatabaseImporterTest.php index d2645d2..98a4d0a 100644 --- a/tests/DatabaseImporterTest.php +++ b/tests/DatabaseImporterTest.php @@ -44,12 +44,11 @@ public function ldap_users_are_not_duplicated_with_alternate_casing() $this->assertTrue($m1->is($m2)); } - /** - * @test - * @expectedException \UnexpectedValueException - */ + /** @test */ public function exception_is_thrown_when_guid_is_null() { + $this->expectException(\UnexpectedValueException::class); + $u = $this->makeLdapUser([ 'objectguid' => null, ]); @@ -57,12 +56,11 @@ public function exception_is_thrown_when_guid_is_null() (new Import($u, new TestUser()))->handle(); } - /** - * @test - * @expectedException \UnexpectedValueException - */ + /** @test */ public function exception_is_thrown_when_guid_is_empty() { + $this->expectException(\UnexpectedValueException::class); + $u = $this->makeLdapUser([ 'objectguid' => ' ', ]); @@ -70,12 +68,11 @@ public function exception_is_thrown_when_guid_is_empty() (new Import($u, new TestUser()))->handle(); } - /** - * @test - * @expectedException \UnexpectedValueException - */ + /** @test */ public function exception_is_thrown_when_username_is_null() { + $this->expectException(\UnexpectedValueException::class); + $u = $this->makeLdapUser([ 'userprincipalname' => null, ]); @@ -83,12 +80,11 @@ public function exception_is_thrown_when_username_is_null() (new Import($u, new TestUser()))->handle(); } - /** - * @test - * @expectedException \UnexpectedValueException - */ + /** @test */ public function exception_is_thrown_when_username_is_empty() { + $this->expectException(\UnexpectedValueException::class); + $u = $this->makeLdapUser([ 'userprincipalname' => ' ', ]); diff --git a/tests/DatabaseProviderTest.php b/tests/DatabaseProviderTest.php index 4f78741..9525f75 100644 --- a/tests/DatabaseProviderTest.php +++ b/tests/DatabaseProviderTest.php @@ -18,12 +18,11 @@ class DatabaseProviderTest extends DatabaseTestCase { use WithFaker; - /** - * @test - * @expectedException \RuntimeException - */ + /** @test */ public function configuration_not_found_exception_when_config_is_null() { + $this->expectException(\RuntimeException::class); + config(['ldap' => null]); App::make(AdldapInterface::class);