-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to lauch test from another SF2 env rather than "test" #46
base: master
Are you sure you want to change the base?
Conversation
👍 |
1 similar comment
👍 |
Here is an implementation of the request feature. It cannot be merged as is : this patch depends on atoum/atoum#310 It allows to do:
The default environment is You will still be able to set the kernel environment at a test level if you want/need: <?php
namespace vendor\FooBundle\Tests\Controller;
use atoum\AtoumBundle\Test\Units\WebTestCase;
use atoum\AtoumBundle\Test\Controller\ControllerTest;
class BarController extends ControllerTest
{
public function testGet()
{
$this
->request(array('debug' => true, 'environment' => 'ci'))
->GET('/demo/' . uniqid())
->hasStatus(404)
->hasCharset('UTF-8')
->hasVersion('1.1')
//...
;
}
} Here are how the environment is selected:
|
excellent ! since then atoum/atoum#310 is merged ! 👍 thanks to you |
🎉 |
Good job @jubianchi ;) |
On va mettre ça en place oui 😄 |
@KuiKui aucun soucis ;) si ça vous va, ça me va aussi |
pointed by @KuiKui we sometimes uses another environment, like "CI"
but the bundle doesnt allow us to create a test kernel in such environment. We are stucked in "test"