可能吗?本git update-index --assume-unchanged是无解的,被忽略的文件已被跟踪.创建子模块.
例如
cat .customgitignore(1 | 2 | 3 ......)
i-do-not-need-this.extension
Run Code Online (Sandbox Code Playgroud)
猫.gitignore
basic-stuff.extension
<load> .customgitignore1
<load> .customgitignore2
<load> .customgitignore3
etc
Run Code Online (Sandbox Code Playgroud)
问题描述感兴趣的人.
我正在创建私人的配置回购.一个分支=一个配置.附加分支作为工作区.我根据需要将其他分支配置与工作空间合并.Branches-configs每个都有自己的.gitignore,只有在合并后才能应用.我试图在gitignore文件中省略冲突.
可以在不使用自动提交+问题集成的情况下将现有提交分配给问题(例如,在提交标题中修复#XXX,关闭#XXX等)?
我用PHPUnit扩展编写了一个测试用例Selenium2TestCase.它确实很好用,但我无法弄清楚make如何在各种浏览器上自动运行此测试.
有一种方法setBrowser()只适用于setUp()方法.我想过这样的事情:
/**
* @dataProvider browsers
*/
public function loginTest($browser) {
$this->setBrowser($browser);
// tests...
}
Run Code Online (Sandbox Code Playgroud)
但我不行.尝试运行默认浏览器(可能我的Safari有点乱,上次使用firefox)
RuntimeException: Safari could not be found in the path!
Please add the directory containing ''Safari'' to your PATH environment
variable, or explicitly specify a path to Safari like this:
*safari /blah/blah/Safari
Run Code Online (Sandbox Code Playgroud)
PS.SeleniumTestCase(不是基于webdriver)提供了一个xml配置,我们可以在其中指定浏览器.Selenium2TestCase不支持它.
欢迎任何建议.谢谢.马尔钦
有没有办法测试Magento POST控制器的动作?例如客户登录:
Mage_Customer_AccountController::loginPostAction()
Run Code Online (Sandbox Code Playgroud)
我正在使用EcomDev_PHPUnit模块进行测试.它适用于基本操作,但我无法调用POST操作.
$this->getRequest()->setMethod('POST');
// ivokes loginAction instead loginPostAction
$this->dispatch('customer/account/login');
// fails also
$this->dispatch('customer/account/loginPost');
// but this assert pass
$this->assertEquals('POST', $_SERVER['REQUEST_METHOD']);
Run Code Online (Sandbox Code Playgroud)
我想做或多或少的测试
// ... some setup
$this->getRequest()->setMethod('POST');
$this->dispatch('customer/account/login');
// since login uses singleton, then...
$session = Mage::getSingleton('customer/session');
$this->assertTrue($session->isLoggedIn());
Run Code Online (Sandbox Code Playgroud) 示例代码:
namespace myns;
$zip = new ZipArchive;
$zip->open('/var/www/less/less_1.zip');
for ($i = 0; $i < $zip->numFiles; $i++) {
echo $zip->getNameIndex($i);
}
Run Code Online (Sandbox Code Playgroud)
当我尝试创建命名空间并使用ZipArchive时,我有一个错误:
PHP Fatal error: Class 'myns\ZipArchive' not found
in /var/www/less/test.php on line 4
Run Code Online (Sandbox Code Playgroud)
没有命名空间'myns'它工作正常.
我会很感激任何想法.
phpunit ×2
git ×1
github ×1
gitignore ×1
magento ×1
namespaces ×1
pecl ×1
php ×1
post ×1
selenium-rc ×1
ziparchive ×1