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 | */ |
||
36 | protected function setupContainer() |
||
55 | |||
56 | protected function setupDatabase(Manager $db) |
||
66 | |||
67 | /** |
||
68 | * Create tables |
||
69 | * |
||
70 | * @return void |
||
71 | */ |
||
72 | protected function migrate() |
||
90 | |||
91 | /** |
||
92 | * Create test users and posts |
||
93 | */ |
||
94 | protected function seed() |
||
109 | |||
110 | /** |
||
111 | * Get Schema Builder |
||
112 | * |
||
113 | * @return \Illuminate\Database\Schema\Builder |
||
114 | */ |
||
115 | protected function schema() |
||
119 | |||
120 | /** |
||
121 | * Tear down the database schema. |
||
122 | * |
||
123 | * @return void |
||
124 | */ |
||
125 | public function tearDown() |
||
131 | |||
132 | /** |
||
133 | * @return EloquentUserRepository |
||
134 | */ |
||
135 | protected function userRepository() |
||
140 | |||
141 | /** |
||
142 | * @return EloquentPostRepository |
||
143 | */ |
||
144 | protected function postRepository() |
||
149 | |||
150 | } |
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.