Skip to content

Commit

Permalink
Fix test with wrong namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
lcharette committed Jan 10, 2019
1 parent 5d644e4 commit ba280be
Show file tree
Hide file tree
Showing 20 changed files with 41 additions and 41 deletions.
2 changes: 1 addition & 1 deletion app/sprinkles/account/tests/Unit/HasherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Unit;
namespace UserFrosting\Sprinkle\Account\Tests\Unit;

use UserFrosting\Sprinkle\Account\Authenticate\Hasher;
use UserFrosting\Tests\TestCase;
Expand Down
2 changes: 1 addition & 1 deletion app/sprinkles/account/tests/Unit/PDOStorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Unit;
namespace UserFrosting\Sprinkle\Account\Tests\Unit;

use Birke\Rememberme\Storage\StorageInterface;
use Carbon\Carbon;
Expand Down
2 changes: 1 addition & 1 deletion app/sprinkles/account/tests/Unit/RegistrationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Unit;
namespace UserFrosting\Sprinkle\Account\Tests\Unit;

use Mockery as m;
use UserFrosting\Tests\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Sprinkle\Admin\Tests;
namespace UserFrosting\Sprinkle\Admin\Tests\Integration;

use UserFrosting\Sprinkle\Account\Tests\withTestUser;
use UserFrosting\Sprinkle\Admin\Controller\AdminController;
Expand Down
2 changes: 1 addition & 1 deletion app/sprinkles/admin/tests/Integration/SprunjeTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Admin\Tests\Integration;

use UserFrosting\Sprinkle\Admin\Sprunje\UserPermissionSprunje;
use UserFrosting\Sprinkle\Core\Util\ClassMapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Symfony\Component\Console\Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Symfony\Component\Console\Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Symfony\Component\Console\Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Symfony\Component\Console\Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Symfony\Component\Console\Application;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use UserFrosting\Sprinkle\Core\Util\CheckEnvironment;
use UserFrosting\Tests\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use UserFrosting\Sprinkle\Core\Database\Migrator\DatabaseMigrationRepository;
use UserFrosting\Sprinkle\Core\Database\Migrator\MigrationLocator;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use UserFrosting\Sprinkle\Core\Tests\TestDatabase;
use UserFrosting\Tests\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Illuminate\Database\Capsule\Manager as Capsule;
Expand Down
44 changes: 22 additions & 22 deletions app/sprinkles/core/tests/Integration/DatabaseTests.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use UserFrosting\Tests\TestCase;
use Illuminate\Database\Eloquent\Relations\Relation;
Expand Down Expand Up @@ -148,8 +148,8 @@ public function testOneToManyRelationship()

$this->assertInstanceOf('Illuminate\Database\Eloquent\Collection', $emails);
$this->assertEquals(2, $emails->count());
$this->assertInstanceOf('UserFrosting\Tests\Integration\EloquentTestEmail', $emails[0]);
$this->assertInstanceOf('UserFrosting\Tests\Integration\EloquentTestEmail', $emails[1]);
$this->assertInstanceOf(EloquentTestEmail::class, $emails[0]);
$this->assertInstanceOf(EloquentTestEmail::class, $emails[1]);
}

/**
Expand Down Expand Up @@ -236,14 +236,14 @@ public function testSyncMorphMany()
[
'id' => 1,
'phoneable_id' => 1,
'phoneable_type' => 'UserFrosting\Tests\Integration\EloquentTestUser',
'phoneable_type' => EloquentTestUser::class,
'label' => 'primary',
'number' => '8883332222'
],
[
'id' => 3,
'phoneable_id' => 1,
'phoneable_type' => 'UserFrosting\Tests\Integration\EloquentTestUser',
'phoneable_type' => EloquentTestUser::class,
'label' => 'fax',
'number' => '5550005555'
]
Expand Down Expand Up @@ -1059,19 +1059,19 @@ protected function generateAssignments()
'task_id' => 2,
'location_id' => 1,
'assignable_id' => 1,
'assignable_type' => 'UserFrosting\Tests\Integration\EloquentTestUser'
'assignable_type' => EloquentTestUser::class
]),
EloquentTestAssignment::create([
'task_id' => 2,
'location_id' => 2,
'assignable_id' => 1,
'assignable_type' => 'UserFrosting\Tests\Integration\EloquentTestUser'
'assignable_type' => EloquentTestUser::class
]),
EloquentTestAssignment::create([
'task_id' => 3,
'location_id' => 2,
'assignable_id' => 1,
'assignable_type' => 'UserFrosting\Tests\Integration\EloquentTestUser'
'assignable_type' => EloquentTestUser::class
]),
EloquentTestAssignment::create([
'task_id' => 3,
Expand All @@ -1083,7 +1083,7 @@ protected function generateAssignments()
'task_id' => 3,
'location_id' => 1,
'assignable_id' => 2,
'assignable_type' => 'UserFrosting\Tests\Integration\EloquentTestUser'
'assignable_type' => EloquentTestUser::class
])
];
}
Expand Down Expand Up @@ -1206,12 +1206,12 @@ class EloquentTestUser extends EloquentTestModel

public function emails()
{
return $this->hasMany('UserFrosting\Tests\Integration\EloquentTestEmail', 'user_id');
return $this->hasMany(EloquentTestEmail::class, 'user_id');
}

public function phones()
{
return $this->morphMany('UserFrosting\Tests\Integration\EloquentTestPhone', 'phoneable');
return $this->morphMany(EloquentTestPhone::class, 'phoneable');
}

/**
Expand All @@ -1221,7 +1221,7 @@ public function phones()
*/
public function roles()
{
return $this->belongsToMany('UserFrosting\Tests\Integration\EloquentTestRole', 'role_users', 'user_id', 'role_id');
return $this->belongsToMany(EloquentTestRole::class, 'role_users', 'user_id', 'role_id');
}

/**
Expand All @@ -1232,8 +1232,8 @@ public function roles()
public function permissions()
{
return $this->belongsToManyThrough(
'UserFrosting\Tests\Integration\EloquentTestPermission',
'UserFrosting\Tests\Integration\EloquentTestRole',
EloquentTestPermission::class,
EloquentTestRole::class,
'role_users',
'user_id',
'role_id',
Expand All @@ -1249,7 +1249,7 @@ public function permissions()
public function assignmentTasks()
{
$relation = $this->morphToManyUnique(
'UserFrosting\Tests\Integration\EloquentTestTask',
EloquentTestTask::class,
'assignable',
'assignments',
null,
Expand All @@ -1265,7 +1265,7 @@ public function assignmentTasks()
public function tasks()
{
$relation = $this->morphToManyUnique(
'UserFrosting\Tests\Integration\EloquentTestTask',
EloquentTestTask::class,
'assignable',
'assignments',
null,
Expand All @@ -1281,7 +1281,7 @@ public function tasks()
public function jobRoles()
{
$relation = $this->belongsToManyUnique(
'UserFrosting\Tests\Integration\EloquentTestRole',
EloquentTestRole::class,
'jobs',
'user_id',
'role_id'
Expand Down Expand Up @@ -1313,7 +1313,7 @@ class EloquentTestEmail extends EloquentTestModel

public function user()
{
return $this->belongsTo('UserFrosting\Tests\Integration\EloquentTestUser', 'user_id');
return $this->belongsTo(EloquentTestUser::class, 'user_id');
}
}

Expand All @@ -1338,7 +1338,7 @@ class EloquentTestRole extends EloquentTestModel
*/
public function permissions()
{
return $this->belongsToMany('UserFrosting\Tests\Integration\EloquentTestPermission', 'permission_roles', 'role_id', 'permission_id');
return $this->belongsToMany(EloquentTestPermission::class, 'permission_roles', 'role_id', 'permission_id');
}
}

Expand All @@ -1352,7 +1352,7 @@ class EloquentTestPermission extends EloquentTestModel
*/
public function roles()
{
return $this->belongsToMany('UserFrosting\Tests\Integration\EloquentTestRole', 'permission_roles', 'permission_id', 'role_id');
return $this->belongsToMany(EloquentTestRole::class, 'permission_roles', 'permission_id', 'role_id');
}
}

Expand Down Expand Up @@ -1388,7 +1388,7 @@ class EloquentTestAssignment extends EloquentTestModel
*/
public function users()
{
return $this->morphedByMany('UserFrosting\Tests\Integration\EloquentTestUser', 'assignable');
return $this->morphedByMany(EloquentTestUser::class, 'assignable');
}
}

Expand All @@ -1402,6 +1402,6 @@ class EloquentTestJob extends EloquentTestModel
*/
public function role()
{
return $this->belongsTo('UserFrosting\Tests\Integration\EloquentTestRole', 'role_id');
return $this->belongsTo(EloquentTestRole::class, 'role_id');
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use UserFrosting\Sprinkle\Core\Database\Migrator\MigrationDependencyAnalyser;
use UserFrosting\Sprinkle\Core\Util\BadClassNameException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use UserFrosting\Tests\TestCase;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Integration;
namespace UserFrosting\Sprinkle\Core\Tests\Integration;

use Mockery as m;
use Illuminate\Support\Collection;
Expand Down
2 changes: 1 addition & 1 deletion app/sprinkles/core/tests/Unit/BelongsToManyThroughTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Unit;
namespace UserFrosting\Sprinkle\Core\Tests\Unit;

use Illuminate\Database\Eloquent\Builder as EloquentBuilder;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
Expand Down
2 changes: 1 addition & 1 deletion app/sprinkles/core/tests/Unit/RouterTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* @license https://github.com/userfrosting/UserFrosting/blob/master/licenses/UserFrosting.md (MIT License)
*/

namespace UserFrosting\Tests\Unit;
namespace UserFrosting\Sprinkle\Core\Tests\Unit;

use UserFrosting\Tests\TestCase;

Expand Down

0 comments on commit ba280be

Please sign in to comment.