diff --git a/composer.json b/composer.json index 9df4a86..9b74f43 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ "php": ">=5.5.9" }, "require-dev": { - "crysalead/kahlan": "^2.4", + "kahlan/kahlan": "^2.4", "illuminate/database": ">=5.2.0" } } diff --git a/spec/ReadOnlyTraitSpec.php b/spec/ReadOnlyTraitSpec.php index c6a13cb..3af4774 100644 --- a/spec/ReadOnlyTraitSpec.php +++ b/spec/ReadOnlyTraitSpec.php @@ -7,6 +7,22 @@ class User extends Illuminate\Database\Eloquent\Model { } describe("User", function() { + describe("::create()", function(){ + + it("is expected to return false", function() { + $user = new User; + expect($user->create([]))->toBe(false); + unset($user); + }); + }); + describe("::forceCreate()", function(){ + + it("is expected to return false", function() { + $user = new User; + expect($user->forceCreate([]))->toBe(false); + unset($user); + }); +}); describe("::save()", function(){ it("is expected to return false", function() { @@ -64,13 +80,6 @@ describe("User", function() { unset($user); }); }); - describe("::test()", function(){ - it("is expected to return false", function() { - $user = new User; - expect($user->test())->toBe(false); - unset($user); - }); - }); }); diff --git a/src/ReadOnlyTrait.php b/src/ReadOnlyTrait.php index 6c5b719..e215329 100644 --- a/src/ReadOnlyTrait.php +++ b/src/ReadOnlyTrait.php @@ -1,39 +1,101 @@