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() |
||
89 | |||
90 | /** |
||
91 | * Create test users and posts. |
||
92 | */ |
||
93 | protected function seed() |
||
120 | |||
121 | /** |
||
122 | * Get Schema Builder. |
||
123 | * |
||
124 | * @return \Illuminate\Database\Schema\Builder |
||
125 | */ |
||
126 | protected function schema() |
||
130 | |||
131 | /** |
||
132 | * Tear down the database schema. |
||
133 | * |
||
134 | * @return void |
||
135 | */ |
||
136 | public function tearDown() |
||
142 | |||
143 | /** |
||
144 | * @return EloquentUserRepository |
||
145 | */ |
||
146 | protected function userRepository() |
||
151 | |||
152 | /** |
||
153 | * @return EloquentPostRepository |
||
154 | */ |
||
155 | protected function postRepository() |
||
160 | } |
||
161 |
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.