1 | <?php |
||
10 | abstract class AbstractEloquentTests extends PHPUnit_Framework_TestCase |
||
|
|||
11 | { |
||
12 | use \Illuminate\Support\Traits\CapsuleManagerTrait; |
||
13 | |||
14 | /** |
||
15 | * @var \Illuminate\Container\Container |
||
16 | */ |
||
17 | protected $container; |
||
18 | |||
19 | /** |
||
20 | * Setup the database schema. |
||
21 | * |
||
22 | * @return void |
||
23 | */ |
||
24 | public function setUp() |
||
31 | |||
32 | /** |
||
33 | * Setup the IoC container instance. |
||
34 | */ |
||
35 | protected function setupContainer() |
||
54 | |||
55 | protected function setupDatabase(Manager $db) |
||
65 | |||
66 | /** |
||
67 | * Create tables. |
||
68 | * |
||
69 | * @return void |
||
70 | */ |
||
71 | protected function migrate() |
||
88 | |||
89 | /** |
||
90 | * Create test users and posts. |
||
91 | */ |
||
92 | protected function seed() |
||
107 | |||
108 | /** |
||
109 | * Get Schema Builder. |
||
110 | * |
||
111 | * @return \Illuminate\Database\Schema\Builder |
||
112 | */ |
||
113 | protected function schema() |
||
117 | |||
118 | /** |
||
119 | * Tear down the database schema. |
||
120 | * |
||
121 | * @return void |
||
122 | */ |
||
123 | public function tearDown() |
||
129 | |||
130 | /** |
||
131 | * @return EloquentUserRepository |
||
132 | */ |
||
133 | protected function userRepository() |
||
138 | |||
139 | /** |
||
140 | * @return EloquentPostRepository |
||
141 | */ |
||
142 | protected function postRepository() |
||
147 | } |
||
148 |
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.