Skip to content

Commit

Permalink
Update KabsaTest.php
Browse files Browse the repository at this point in the history
  • Loading branch information
BSN4 committed Mar 30, 2020
1 parent 5755314 commit c1fa72d
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions tests/KabsaTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,50 @@ public function first_test()
$this->assertEquals('admin', Role::first()->label);
}

/** @test * */
public function static_var()
{
$this->assertEquals([
['label' => 'admin'],
['label' => 'manager'],
['label' => 'user']
], Role::all()->toArray());


$this->assertEquals([
['label' => 'admin'],
['label' => 'manager'],
['label' => 'user']
], Role::$kabsaCollection->toArray());


Role::$kabsaCollection = collect([['static']]);

//one
$this->assertEquals([
['static']
], Role::all()->toArray());

//two
$this->assertEquals([
['static']
], Role::all()->toArray());

Role::$kabsaCollection = [];

$this->assertEquals([
['label' => 'admin'],
['label' => 'manager'],
['label' => 'user']
], Role::all()->toArray());

$this->assertEquals([
['label' => 'admin'],
['label' => 'manager'],
['label' => 'user']
], Role::$kabsaCollection->toArray());
}

/**
* Define environment setup.
*
Expand Down

0 comments on commit c1fa72d

Please sign in to comment.