|
@@ 85-98 (lines=14) @@
|
| 82 |
|
$this->assertNull($results); |
| 83 |
|
} |
| 84 |
|
|
| 85 |
|
public function testUpdatingModelClearsCache() |
| 86 |
|
{ |
| 87 |
|
$author = (new Author)->with('books')->get()->first(); |
| 88 |
|
$author->name = "John Jinglheimer"; |
| 89 |
|
$author->save(); |
| 90 |
|
|
| 91 |
|
$results = cache()->tags([ |
| 92 |
|
'genealabslaravelmodelcachingtestsfixturesauthor', |
| 93 |
|
'genealabslaravelmodelcachingtestsfixturesbook' |
| 94 |
|
]) |
| 95 |
|
->get('genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_7_8_9_10-genealabslaravelmodelcachingtestsfixturesbooks'); |
| 96 |
|
|
| 97 |
|
$this->assertNull($results); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
public function testDeletingModelClearsCache() |
| 101 |
|
{ |
|
@@ 100-112 (lines=13) @@
|
| 97 |
|
$this->assertNull($results); |
| 98 |
|
} |
| 99 |
|
|
| 100 |
|
public function testDeletingModelClearsCache() |
| 101 |
|
{ |
| 102 |
|
$author = (new Author)->with('books')->get()->first(); |
| 103 |
|
$author->delete(); |
| 104 |
|
|
| 105 |
|
$results = cache()->tags([ |
| 106 |
|
'genealabslaravelmodelcachingtestsfixturesauthor', |
| 107 |
|
'genealabslaravelmodelcachingtestsfixturesbook' |
| 108 |
|
]) |
| 109 |
|
->get('genealabslaravelmodelcachingtestsfixturesauthor_1_2_3_4_5_6_7_8_9_10-genealabslaravelmodelcachingtestsfixturesbooks'); |
| 110 |
|
|
| 111 |
|
$this->assertNull($results); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
public function testHasManyRelationshipIsCached() |
| 115 |
|
{ |