public function testCreateServices()
 {
     //simulate form input
     $post = ['tServices' => ['Name' => 'Service name']];
     $services = new tServices();
     $this->assertTrue($services->load($post), 'Load services POST data');
     $this->assertTrue($services->validate(), 'Validate services');
     $this->assertTrue($services->save(), 'Create services');
     return $services;
 }
예제 #2
0
 public function getService()
 {
     return $this->hasOne(tServices::className(), ['id' => 'idService']);
 }