File tree Expand file tree Collapse file tree 1 file changed +24
-1
lines changed
Expand file tree Collapse file tree 1 file changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ class ProxyTest extends PHPUnit_Framework_TestCase {
1010
1111 public function setUp () {
1212 self ::$ driver = new PHPWebDriver_WebDriver ();
13- self ::$ client = new PHPBrowserMobProxy_Client ("localhost:9090 " );
13+ self ::$ client = new PHPBrowserMobProxy_Client ("localhost:8080 " );
1414 }
1515
1616 public function tearDown () {
@@ -43,5 +43,28 @@ public function testFirefox() {
4343 $ this ->session = self ::$ driver ->session ('firefox ' , $ additional_capabilities );
4444 $ this ->session ->open ("http://github.com/adamgoucher " );
4545 }
46+
47+ /**
48+ * @group proxy
49+ * @group firefox
50+ * @group auth
51+ */
52+ public function testAuthentication () {
53+ $ additional_capabilities = array ();
54+ $ proxy = new PHPWebDriver_WebDriverProxy ();
55+ $ proxy ->httpProxy = self ::$ client ->url ;
56+ $ proxy ->add_to_capabilities ($ additional_capabilities );
57+ $ this ->session = self ::$ driver ->session ('firefox ' , $ additional_capabilities );
58+
59+ self ::$ client ->basic_auth ('www.httpwatch.com ' , array ('username ' => 'httpwatch ' , 'password ' => 'blah ' ));
60+ $ this ->session ->open ("http://www.httpwatch.com/httpgallery/authentication/authenticatedimage/default.aspx?0.992212271085009 " );
61+
62+ sleep (3 );
63+
64+ self ::$ client ->headers (array ('monkey ' => 'butt ' ));
65+ $ this ->session ->open ("http://www.cylog.org/headers/ " );
66+
67+ sleep (4 );
68+ }
4669}
4770?>
You can’t perform that action at this time.
0 commit comments