I'm having trouble with using PHPUnit to test my Laravel package that I am writing. I am writing a class which extends the formbuilder, I have tried it against my own class and the parent class, (Illuminate\Html\Formbuilder), but I am getting the same error.
My test is
use Illuminate\Html\FormBuilder as Form;
class FormBuilderTest extends PHPUnit_Framework_TestCase {
function test_basic_input() {
$html = Form::text('test');
$this->assertContains('input', $html);
}
}
This fails with the following message
Non-static method Illuminate\Html\FormBuilder::text() should not be called statically, assuming $this from incompatible context
I can't figure out what is going on with it, as far as I can tell this is the same static call that is made from blade in the framework.
Can anyone point me in the write direction with this one?