Пример #1
0
 public function test()
 {
     $key = getenv('CUSTOMER_KEY');
     if (strlen($key) === 0) {
         $this->markTestSkipped("must set CUSTOMER_KEY env");
     }
     $oauth = new OAuth($key, "http://example.com/");
     $requestToken = $oauth->fetchRequestToken();
     assertThat($requestToken, logicalNot(isEmpty()));
     $authorizeUrl = $oauth->generateAuthorizeUrl($requestToken);
     assertThat($authorizeUrl, logicalNot(isEmpty()));
 }
 public function testAssertThatJsonDocumentMatchesJsonConstraints()
 {
     assertThat(self::$exampleDocument, matchesJsonConstraints(['$.owner.name' => equalTo('Max Mustermann'), '$.products[*].identifier' => greaterThanOrEqual(500), '$.products[*].name' => logicalNot(equalTo('Weißbrot'))]));
 }