public function test__invoke__TableNameAsConstructParam() { global $testCase; $testCase = 'default'; $factoryClass = static::FACTORY_CLASS; $storeClass = static::STORE_CLASS; $this->container = (include './config/container.php'); $this->object = new $factoryClass(); $this->tableManagerMysql = $this->container->get(TableManagerMysql::KEY_IN_CONFIG); // if tables is absent $this->tableName = 'table_test_construct_param'; $this->tableManagerMysql->deleteTable($this->tableName); $this->assertFalse($this->tableManagerMysql->hasTable($this->tableName)); $store = $this->object->__invoke($this->container, '', [$factoryClass::KEY_TABLE_NAME => $this->tableName]); $this->assertInstanceOf($storeClass, $store); // if tables is present $this->assertTrue($this->tableManagerMysql->hasTable($this->tableName)); $store = $this->object->__invoke($this->container, '', [$factoryClass::KEY_TABLE_NAME => $this->tableName]); $this->assertInstanceOf($storeClass, $store); $this->tableManagerMysql->deleteTable($this->tableName); }