PHPUnit_Framework_Exception: Creating default object from empty value

I’m devising a codeception test to load a component,… I have the following test file


<?php

namespace tests\codeception\common;

use Yii;


class FoursquareTest extends \Codeception\TestCase\Test

{

    public $appConfig = '@tests/codeception/config/common/unit.php';


    public function setUp()

    {

        parent::setUp();


        $config = [

            'components' => [

              'foursquare' =>

              [

                'class' => 'Foursquare',

                'clientId' => '',

                'secret' => ''

              ]

            ]];

        Yii::configure(Yii::$app, $config);

    }

    // tests

    public function testSearch()

    {

      //$this->assertInstanceOf('garyrutland\\foursquare\\Foursquare', Yii::$app->foursquare);

    }


    public function fixtures()

    {

        return [

            'foursquare' => [

                'class' => FoursquareFixture::className()

            ],

        ];

    }


}



But when I run


codecept run unit FoursquareTest.php -vv

I get




PHPUnit_Framework_Exception: Creating default object from empty value


                                                                          

  [PHPUnit_Framework_Exception] Creating default object from empty value  

                                                                          

#1  /Users/kendallarneaud/Documents/SERVER/htdocs/yii/vendor/yiisoft/yii2/BaseYii.php:518

#2  /Users/kendallarneaud/Documents/SERVER/htdocs/yii/tests/codeception/common/unit/FoursquareTest.php:22



I instantiate the Foursquare class directly though there is no problem…

Whay do i gee the created Object Error

anybody?