cvs: pear-core /tests/PEAR_Command_Package/makerpm test_makerpm_oldfallback.phpt test_makerpm_passthru.phpt
/tests/PEAR_Command_Package/makerpm/packagefiles Net_SMTP-1.2.8.tgz

From: Date: Mon, 20 Feb 2006 15:25:45 +0000
Subject: cvs: pear-core /tests/PEAR_Command_Package/makerpm test_makerpm_oldfallback.phpt test_makerpm_passthru.phpt
/tests/PEAR_Command_Package/makerpm/packagefiles Net_SMTP-1.2.8.tgz
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4555@lists.php.net to get a copy of this message
timj Mon Feb 20 15:25:45 2006 UTC Added files: /pear-core/tests/PEAR_Command_Package/makerpm test_makerpm_oldfallback.phpt test_makerpm_passthru.phpt /pear-core/tests/PEAR_Command_Package/makerpm/packagefiles Net_SMTP-1.2.8.tgz Log: Add unit tests for makerpm deprecation check/passthru to PEAR_Command_Packaging http://cvs.php.net/viewcvs.cgi/pear-core/tests/PEAR_Command_Package/makerpm/test_makerpm_oldfallback.phpt?view=markup&rev=1.1 Index: pear-core/tests/PEAR_Command_Package/makerpm/test_makerpm_oldfallback.phpt +++ pear-core/tests/PEAR_Command_Package/makerpm/test_makerpm_oldfallback.phpt --TEST-- makerpm with fallback to OLD makerpm code in PEAR --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setup.php.inc'; class test2_PEAR_Command_Package extends test_PEAR_Command_Package { function getCommandPackaging(&$ui, &$config) { return null; } } $command = &new test2_PEAR_Command_Package($fakelog, $config); copy(dirname(__FILE__) . '/packagefiles/Net_SMTP-1.2.8.tgz', $temp_path . DIRECTORY_SEPARATOR . 'Net_SMTP-1.2.8.tgz'); chdir($temp_path); $ret = $command->run('makerpm', array(), array('Net_SMTP-1.2.8.tgz')); $phpunit->assertNoErrors('ret OK'); $phpunit->showall(); $phpunit->assertEquals(array( 'info' => 'WARNING: "pear makerpm" is now deprecated; an improved version is available via "pear make-rpm-spec", which is available by installing PEAR_Command_Packaging', 'cmd' => 'no command', ) , array_shift($fakelog->getLog()),'warning about deprecation'); echo 'tests done'; ?> --CLEAN-- <?php require_once dirname(dirname(__FILE__)) . '/teardown.php.inc'; ?> --EXPECT-- tests done http://cvs.php.net/viewcvs.cgi/pear-core/tests/PEAR_Command_Package/makerpm/test_makerpm_passthru.phpt?view=markup&rev=1.1 Index: pear-core/tests/PEAR_Command_Package/makerpm/test_makerpm_passthru.phpt +++ pear-core/tests/PEAR_Command_Package/makerpm/test_makerpm_passthru.phpt --TEST-- makerpm with fall-through to PEAR_Command_Packaging --SKIPIF-- <?php if (!getenv('PHP_PEAR_RUNTESTS')) { echo 'skip'; } ?> --FILE-- <?php error_reporting(E_ALL); require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'setup.php.inc'; // This test requires PEAR_Command_Packaging to be installed to work copy(dirname(__FILE__) . '/packagefiles/Net_SMTP-1.2.8.tgz', $temp_path . DIRECTORY_SEPARATOR . 'Net_SMTP-1.2.8.tgz'); chdir($temp_path); $ret = $command->run('makerpm', array(), array('Net_SMTP-1.2.8.tgz')); $phpunit->assertNoErrors('ret OK'); $phpunit->showall(); $phpunit->assertEquals(array( 'info' => 'PEAR_Command_Packaging is installed; using newer "make-rpm-spec" command instead', 'cmd' => 'no command' ), array_shift($fakelog->getLog()),'descriptive output about passthru'); echo 'tests done'; ?> --CLEAN-- <?php require_once dirname(dirname(__FILE__)) . '/teardown.php.inc'; ?> --EXPECT-- tests done

« previous php.pear.core (#4555) next »