<?php
use Codeception\Util\Stub;
class AccountModelTest extends \Codeception\TestCase\Test
{
/**
* @var \CodeGuy
*/
protected $codeGuy;
protected function _before()
{
$this->account = new Account();
}
protected function _after()
{
}
/**
* Test form validation
*/
public function testAccountValidation()
{
//check name validation
$this->assertFalse($this->account->validate());
$this->account->name = \Faker\Provider\Lorem::text(46);
$this->assertFalse($this->account->validate());
$this->account->name = \Faker\Provider\Lorem::text(32);
$this->assertTrue($this->account->validate());
//check description validation
$this->account->description = \Faker\Provider\Lorem::text(129);
$this->assertFalse($this->account->validate());
$this->account->description = \Faker\Provider\Lorem::text(64);
$this->assertTrue($this->account->validate());
//check number validation
$this->account->number = \Faker\Provider\Lorem::text(31);
$this->assertFalse($this->account->validate());
$this->account->number = \Faker\Provider\Lorem::text(24);
$this->assertTrue($this->account->validate());
}
}```
The error:
Unit Tests (1) ------------------------------------------------------------------------
Trying to test account validation (AccountModelTest::testAccountValidation) PHP Fatal error: Call to a member function make() on a non-object in /Users/.../vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 214```
Is Ardent testable? It seems like I'm not doing anything special here and it's throwing a fatal error
My model:
My test:
Unit Tests (1) ------------------------------------------------------------------------ Trying to test account validation (AccountModelTest::testAccountValidation) PHP Fatal error: Call to a member function make() on a non-object in /Users/.../vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 214```