@@ -35,7 +35,7 @@ |
||
35 | 35 | |
36 | 36 | public function testWhereClauseWorksWithDateTimeObject() |
37 | 37 | { |
38 | - $dateTime = (new DateTime('@' . time())) |
|
38 | + $dateTime = (new DateTime('@'.time())) |
|
39 | 39 | ->sub(new DateInterval("P10Y")); |
40 | 40 | $dateTimeString = $dateTime->format("Y-m-d-H-i-s"); |
41 | 41 | $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:books:genealabslaravelmodelcachingtestsfixturesbook-publish_at_>_{$dateTimeString}:http://localhost"); |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | ->whereRaw("name != 'test3'") |
35 | 35 | ->whereRaw('name = ? AND name != ?', [$authorName, "test2"]) |
36 | 36 | ->get(); |
37 | - $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-name_!=_test-_and_name_!=_'test3'-_and_name_=_" . str_replace(" ", "_", $authorName) . "__AND_name_!=_test2-authors.deleted_at_null:http://localhost"); |
|
37 | + $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-name_!=_test-_and_name_!=_'test3'-_and_name_=_".str_replace(" ", "_", $authorName)."__AND_name_!=_test2-authors.deleted_at_null:http://localhost"); |
|
38 | 38 | $tags = ["genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor"]; |
39 | 39 | |
40 | 40 | $cachedResults = collect([$this->cache()->tags($tags)->get($key)['value']]); |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | ]; |
71 | 71 | |
72 | 72 | $authors = (new Author) |
73 | - ->where(function ($query) { |
|
73 | + ->where(function($query) { |
|
74 | 74 | $query->orWhereRaw("id BETWEEN 1 AND 3") |
75 | 75 | ->orWhereRaw("id BETWEEN 5 AND 6"); |
76 | 76 | }) |
@@ -82,13 +82,13 @@ discard block |
||
82 | 82 | public function testNestedWhereRawWithBindings() |
83 | 83 | { |
84 | 84 | $books = (new Book) |
85 | - ->where(function ($query) { |
|
86 | - $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%',]); |
|
85 | + ->where(function($query) { |
|
86 | + $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%', ]); |
|
87 | 87 | })->get(); |
88 | 88 | |
89 | 89 | $uncachedBooks = (new UncachedBook) |
90 | - ->where(function ($query) { |
|
91 | - $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%',]); |
|
90 | + ->where(function($query) { |
|
91 | + $query->whereRaw("title like ? or description like ? or published_at like ? or price like ?", ['%larravel%', '%larravel%', '%larravel%', '%larravel%', ]); |
|
92 | 92 | })->get(); |
93 | 93 | |
94 | 94 | $this->assertEquals($books->pluck("id"), $uncachedBooks->pluck("id")); |
@@ -11,7 +11,7 @@ |
||
11 | 11 | $key = sha1("genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:authors:genealabslaravelmodelcachingtestsfixturesauthor-authors.deleted_at_null:http://localhost"); |
12 | 12 | $tags = ["genealabs:laravel-model-caching:testing:{$this->testingSqlitePath}testing.sqlite:genealabslaravelmodelcachingtestsfixturesauthor"]; |
13 | 13 | |
14 | - $authors = app("model-cache")->runDisabled(function () { |
|
14 | + $authors = app("model-cache")->runDisabled(function() { |
|
15 | 15 | return (new Author) |
16 | 16 | ->get(); |
17 | 17 | }); |