public function testScopeVariables() { $one = 'banana'; $two = 123; $three = new \StdClass(); $__psysh__ = 'ignore this'; $_ = 'ignore this'; $_e = 'ignore this'; $shell = new Shell($this->getConfig()); $shell->setScopeVariables(compact('one', 'two', 'three', '__psysh__', '_', '_e')); $this->assertNotContains('__psysh__', $shell->getScopeVariableNames()); $this->assertEquals(array('one', 'two', 'three', '_'), $shell->getScopeVariableNames()); $this->assertEquals('banana', $shell->getScopeVariable('one')); $this->assertEquals(123, $shell->getScopeVariable('two')); $this->assertSame($three, $shell->getScopeVariable('three')); $this->assertNull($shell->getScopeVariable('_')); $shell->setScopeVariables(array()); $this->assertEquals(array('_'), $shell->getScopeVariableNames()); }