Skip to content

Commit

Permalink
added support for laravel 8
Browse files Browse the repository at this point in the history
  • Loading branch information
leopado committed Oct 23, 2020
1 parent 0eadd96 commit 4da785b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
},
"require-dev": {
"ext-json": "*",
"orchestra/testbench": "^4.0|^5.0",
"orchestra/testbench": "^4.0|^5.0|^6.0",
"phpunit/phpunit": "^8.0|^9.0"
},
"autoload": {
Expand Down
2 changes: 1 addition & 1 deletion tests/ActivityModelTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ public function it_provides_a_scope_to_get_all_log_items_related_to_subject()
$this->assertCount(1, $activities);


$this->assertRegexp('/users":"'.$user2->id.'"/',json_encode($activities->first()->properties));
$this->assertMatchesRegularExpression('/users":"'.$user2->id.'"/',json_encode($activities->first()->properties));
$this->assertEquals($causer->getKey(), $activities->first()->causer_id);
$this->assertEquals(get_class($causer), $activities->first()->causer_type);
$this->assertEquals($Article->getKey(), $activities->first()->subject_id);
Expand Down
9 changes: 6 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,15 @@ protected function createActivityLogTable()
include_once '__DIR__'.'/../vendor/spatie/laravel-activitylog/migrations/create_activity_log_table.php.stub';

(new \CreateActivityLogTable())->up();
if (file_exists('__DIR__'.'/../vendor/spatie/laravel-activitylog/migrations/add_event_column_to_activity_log_table.php.stub')){
include_once '__DIR__'.'/../vendor/spatie/laravel-activitylog/migrations/add_event_column_to_activity_log_table.php.stub';
(new \AddEventColumnToActivityLogTable())->up();
}

include_once '__DIR__'.'/../vendor/spatie/laravel-activitylog/migrations/add_event_column_to_activity_log_table.php.stub';

(new \AddEventColumnToActivityLogTable())->up();

include_once '__DIR__'.'/..//migrations/enhance_activity_log_table.php.stub';

include_once '__DIR__'.'/../migrations/enhance_activity_log_table.php.stub';

(new \EnhanceActivityLogTable())->up();
}
Expand Down

0 comments on commit 4da785b

Please sign in to comment.