- $request = new FauxRequest( array( 'wpFileKey' => 'testkey-test.test', 'wpSessionKey' => 'foo' ) );
- $this->assertTrue( UploadFromStash::isValidRequest( $request ), 'Check key precedence' );
+ public function provideValidRequests() {
+ return array(
+ 'Check good wpFileKey' =>
+ array( new FauxRequest( array( 'wpFileKey' => 'testkey-test.test' ) ) ),
+ 'Check good wpSessionKey' =>
+ array( new FauxRequest( array( 'wpFileKey' => 'testkey-test.test' ) ) ),
+ 'Check key precedence' =>
+ array( new FauxRequest( array(
+ 'wpFileKey' => 'testkey-test.test',
+ 'wpSessionKey' => 'foo'
+ ) ) ),
+ );