New WebApp Selenium function test fails - Exception: Unknown property 'name' for 'SiteTest'


I am on Ubuntu with Apache2.

I have installed Selenium 2.15.0 and PHPUnit 3.5.15

I have tried to run functional test on a fresh webapp and get this:

[font="Courier New"]

PHPUnit 3.5.15 by Sebastian Bergmann.


Time: 14 seconds, Memory: 9.25Mb

There were 3 errors:

  1. SiteTest::testIndex

Exception: Unknown property ‘name’ for class ‘SiteTest’.


  1. SiteTest::testContact

Exception: Unknown property ‘name’ for class ‘SiteTest’.


  1. SiteTest::testLoginLogout

Exception: Unknown property ‘name’ for class ‘SiteTest’.



Tests: 3, Assertions: 0, Errors: 3.


this error goes away if i comment out line 46 ie. [i](throw new Exception(“Unknown property ‘$name’ for class '”.get_class($this)."’.");)

[/i] from CWebTestCase.php in framework/test folder

public function __get($name)


		if(is_array($this->fixtures) && ($rows=$this->getFixtureManager()->getRows($name))!==false)

			return $rows;


			throw new Exception("Unknown property '$name' for class '".get_class($this)."'.");


But then I get error on line 96 which is:

	public function getFixtureRecord($name,$alias)


		return $this->getFixtureManager()->getRecord($name,$alias);


Can anyone please help me? What is this $name thing?

Sorry I am new to linux, PHP and Yii… and so this might be very trivial for you guys.

Thanks in advance.


Can you post the stack trace?

I am a newbie as well and came across the same issue. I got around it by adding a property $name to the SiteTest class.

I solve it creating a variable called name

class SiteTest extends WebTestCase


    public $name = '';

	public function testIndex()