function testCreateFromIni() { $ini = $this->_createIni("\n repository=svn://svn.bit/\n key=/id_dsa/key\n host=srv2.0x00.ru\n user=syncman\n remote_dir=/var/www/mydir\n presync_cmd=php %local_dir%/cli/pre_sync.php\n postsync_cmd=ssh -i %key% %user%@%host% 'php %remote_dir%/cli/post_sync.php'\n sync_cmd=rsync -Cavz -e 'ssh -i %key%' %user%@%host%\n "); $project = Project::createFromIni('foo', $ini); $this->assertEqual($project->getName(), 'foo'); $this->assertEqual($project->getHost(), 'srv2.0x00.ru'); $this->assertEqual($project->getUser(), 'syncman'); $this->assertEqual($project->getRemoteDir(), '/var/www/mydir'); $this->assertEqual($project->getKey(), '/id_dsa/key'); $this->assertEqual($project->getPresyncCmd(), 'php ' . $project->getLocalDir() . '/cli/pre_sync.php'); $this->assertEqual($project->getPostsyncCmd(), "ssh -i /id_dsa/key syncman@srv2.0x00.ru 'php /var/www/mydir/cli/post_sync.php'"); $this->assertEqual($project->getSyncCmd(), "rsync -Cavz -e 'ssh -i /id_dsa/key' syncman@srv2.0x00.ru"); }