Example #1
0
 public function testLoadConfigFile()
 {
     $config = new Configuration(array('configFile' => __DIR__ . '/../../fixtures/rc.php'));
     $tempDir = $this->joinPath(realpath(sys_get_temp_dir()), 'psysh_test', 'withconfig', 'temp');
     $this->assertStringStartsWith($tempDir, realpath($config->getTempFile('foo', 123)));
     $this->assertStringStartsWith($tempDir, realpath(dirname($config->getPipe('pipe', 123))));
     $this->assertStringStartsWith($tempDir, realpath($config->getTempDir()));
     $this->assertEquals(function_exists('readline'), $config->useReadline());
     $this->assertFalse($config->usePcntl());
 }
 /**
  * @expectedException PHPUnit_Framework_Error_Deprecated
  */
 public function testGetTempDirIsDeprecated()
 {
     $config = new Configuration();
     $config->getTempDir();
 }