diff --git a/src/Illuminate/Contracts/Auth/Authenticatable.php b/src/Illuminate/Contracts/Auth/Authenticatable.php new file mode 100644 index 000000000..4e5a80061 --- /dev/null +++ b/src/Illuminate/Contracts/Auth/Authenticatable.php @@ -0,0 +1,14 @@ +class = $class; + $this->id = $id; + $this->relations = $relations; + $this->connection = $connection; + } + + public function useCollectionClass(?string $collectionClass) + { + $this->collectionClass = $collectionClass; + return $this; + } + + public function getClass(): ?string + { + return $this->class; + } +} diff --git a/src/Illuminate/Contracts/Encryption/DecryptException.php b/src/Illuminate/Contracts/Encryption/DecryptException.php new file mode 100644 index 000000000..7edebc9ca --- /dev/null +++ b/src/Illuminate/Contracts/Encryption/DecryptException.php @@ -0,0 +1,10 @@ +render(); } diff --git a/src/Illuminate/Support/Contracts/ArrayableInterface.php b/src/Illuminate/Support/Contracts/ArrayableInterface.php index 03834929e..55f136459 100755 --- a/src/Illuminate/Support/Contracts/ArrayableInterface.php +++ b/src/Illuminate/Support/Contracts/ArrayableInterface.php @@ -1,6 +1,8 @@ data = $data instanceof Arrayable ? $data->toArray() : (array) $data; } - /** - * Get the string contents of the view. - * - * @param \Closure $callback - * @return string - */ public function render(?Closure $callback = null) { try { diff --git a/tests/Http/HttpResponseTest.php b/tests/Http/HttpResponseTest.php index 735ec8bc3..d245e3118 100755 --- a/tests/Http/HttpResponseTest.php +++ b/tests/Http/HttpResponseTest.php @@ -3,7 +3,7 @@ use Illuminate\Http\Response; use Illuminate\Support\Contracts\ArrayableInterface; use Illuminate\Support\Contracts\JsonableInterface; -use Illuminate\Support\Contracts\RenderableInterface; +use Illuminate\Contracts\Support\Renderable; use L4\Tests\BackwardCompatibleTestCase; use Mockery as m; use Symfony\Component\HttpFoundation\Cookie; @@ -52,7 +52,7 @@ public function testJsonResponsesAreConvertedAndHeadersAreSet() public function testRenderablesAreRendered() { - $mock = m::mock(RenderableInterface::class); + $mock = m::mock(Renderable::class); $mock->shouldReceive('render')->once()->andReturn('foo'); $response = new Response($mock); $this->assertEquals('foo', $response->getContent()); diff --git a/tests/View/ViewTest.php b/tests/View/ViewTest.php index 4c11f479a..f6797238c 100755 --- a/tests/View/ViewTest.php +++ b/tests/View/ViewTest.php @@ -1,7 +1,7 @@ getFactory()->shouldReceive('decrementRender')->once()->ordered(); $view->getFactory()->shouldReceive('flushSectionsIfDoneRendering')->once(); - $view->renderable = m::mock(RenderableInterface::class); + $view->renderable = m::mock(Renderable::class); $view->renderable->shouldReceive('render')->once()->andReturn('text'); $this->assertEquals('contents', $view->render()); }