本文整理汇总了PHP中UnitTester::seeRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP UnitTester::seeRecord方法的具体用法?PHP UnitTester::seeRecord怎么用?PHP UnitTester::seeRecord使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UnitTester
的用法示例。
在下文中一共展示了UnitTester::seeRecord方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testUserAdd
public function testUserAdd()
{
$user = factory(User::class, 'valid-user')->make();
$values = ['first_name' => $user->first_name, 'last_name' => $user->last_name, 'email' => $user->email, 'username' => $user->username, 'password' => $user->password];
User::create($values);
$this->tester->seeRecord('users', $values);
}
示例2: testLostStatuslabelAdd
public function testLostStatuslabelAdd()
{
$statuslabel = factory(Statuslabel::class, 'lost')->make();
$values = ['name' => $statuslabel->name];
Statuslabel::create($values);
$this->tester->seeRecord('status_labels', $values);
}
示例3: testManufacturerAdd
public function testManufacturerAdd()
{
$manufacturers = factory(Manufacturer::class, 'manufacturer')->make();
$values = ['name' => $manufacturers->name];
Manufacturer::create($values);
$this->tester->seeRecord('manufacturers', $values);
}
示例4: testAssetAdd
public function testAssetAdd()
{
$location = factory(Location::class, 'location')->make();
$values = ['name' => $location->name];
Location::create($values);
$this->tester->seeRecord('locations', $values);
}
示例5: testConsumableAdd
public function testConsumableAdd()
{
$consumable = factory(Consumable::class, 'consumable')->make();
$values = ['name' => $consumable->name, 'qty' => $consumable->qty, 'category_id' => $consumable->category_id, 'company_id' => $consumable->company_id];
Consumable::create($values);
$this->tester->seeRecord('consumables', $values);
}
示例6: testAccessoryAdd
public function testAccessoryAdd()
{
$accessory = factory(Accessory::class, 'accessory')->make();
$values = ['name' => $accessory->name, 'category_id' => $accessory->category_id, 'qty' => $accessory->qty];
Accessory::create($values);
$this->tester->seeRecord('accessories', $values);
}
示例7: testDepreciationAdd
public function testDepreciationAdd()
{
$depreciations = factory(Depreciation::class, 'depreciation')->make();
$values = ['name' => $depreciations->name, 'months' => $depreciations->months];
Depreciation::create($values);
$this->tester->seeRecord('depreciations', $values);
}
示例8: testSupplierAdd
public function testSupplierAdd()
{
$supplier = factory(Supplier::class, 'supplier')->make();
$values = ['name' => $supplier->name];
Supplier::create($values);
$this->tester->seeRecord('suppliers', $values);
}
示例9: testRoleCanBeCreated
public function testRoleCanBeCreated()
{
$role = new \ChopBox\Role();
$role->role_name = "admin";
$role->save();
$this->tester->seeRecord('roles', ['role_name' => 'admin']);
}
示例10: testAssetAdd
public function testAssetAdd()
{
$asset = factory(Asset::class, 'asset')->make();
$values = ['name' => $asset->name, 'model_id' => $asset->model_id, 'status_id' => $asset->status_id, 'asset_tag' => $asset->asset_tag];
Asset::create($values);
$this->tester->seeRecord('assets', $values);
}
示例11: testAccessoryCategoryAdd
public function testAccessoryCategoryAdd()
{
$category = factory(Category::class, 'accessory-category')->make();
$values = ['name' => $category->name, 'category_type' => $category->category_type];
Category::create($values);
$this->tester->seeRecord('categories', $values);
}
示例12: testLostStatuslabelAdd
public function testLostStatuslabelAdd()
{
$statuslabel = factory(Statuslabel::class, 'lost')->make();
$values = ['name' => $statuslabel->name, 'deployable' => $statuslabel->deployable, 'pending' => $statuslabel->pending, 'archived' => $statuslabel->archived];
Statuslabel::create($values);
$this->tester->seeRecord('status_labels', $values);
}
示例13: testAssetModelAdd
public function testAssetModelAdd()
{
$assetmodel = factory(AssetModel::class, 'assetmodel')->make();
$values = ['name' => $assetmodel->name, 'manufacturer_id' => $assetmodel->manufacturer_id, 'category_id' => $assetmodel->category_id, 'eol' => $assetmodel->eol];
AssetModel::create($values);
$this->tester->seeRecord('models', $values);
}
示例14: testAssetAdd
public function testAssetAdd()
{
$company = factory(Company::class, 'company')->make();
$values = ['name' => $company->name];
Company::create($values);
$this->tester->seeRecord('companies', $values);
}
示例15: testRegister
public function testRegister()
{
$email = 'johndoe@example.com';
$name = 'John Doe';
$password = Hash::make('password');
User::register(['email' => $email, 'password' => $password, 'name' => $name]);
$this->tester->seeRecord('users', ['email' => $email, 'password' => $password, 'name' => $name]);
}