SocialAccounts = TableRegistry::getTableLocator()->get('CakeDC/Users.SocialAccounts'); } /** * tearDown method * * @return void */ public function tearDown() { unset($this->SocialAccounts); parent::tearDown(); } public function testValidationHappy() { $data = [ 'provider' => 'Facebook', 'reference' => 'test-reference', 'link' => 'test-link', 'token' => 'test-token', 'active' => 0, 'data' => 'test-data', ]; $entity = $this->SocialAccounts->newEntity($data); $this->assertEmpty($entity->getErrors()); } }