Skip to content

Commit

Permalink
Merge pull request #10 from adquesto/feat/travis
Browse files Browse the repository at this point in the history
travis-ci
  • Loading branch information
Kub-AT authored Jan 3, 2019
2 parents 53a5f1d + f4da4a8 commit f502835
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@ php:
- '5.6'
- '7.2'
- '7.3'
- nightly
- nightly
before_script: composer update
script: vendor/bin/phpunit
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Easy custom integration with only few steps required to start displaying ads.


[![Travis-ci](https://api.travis-ci.org/adquesto/adquesto-php-sdk.svg?branch=master)](https://travis-ci.org/adquesto/adquesto-php-sdk/)


## Install

`composer require adquesto/adquesto-php-sdk`
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Adquesto PHP integration toolkit",
"type": "library",
"require-dev": {
"phpunit/phpunit": "^7.2"
"phpunit/phpunit": "^5.6 || ^7.1"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion tests/ContentTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
namespace Adquesto\SDK\Tests;

use PHPUnit\Framework\TestCase;

use Adquesto\SDK\Content;
use Adquesto\SDK\CurlHttpClient;
use Adquesto\SDK\InMemoryStorage;
use Adquesto\SDK\PositioningSettings;


class ContentTest extends TestCase
{
function testGetChildNodesFromContent()
{
$html = '<div class="header"><h1>HEADER</h1></div><div class="p2">2</div><div class="p2">P2</div>';
$nodes = Content::getChildNodesFromContent($html);
$instance = new Content('', 1, new InMemoryStorage(), new CurlHttpClient(),
PositioningSettings::factory(PositioningSettings::STRATEGY_UPPER));
$nodes = $instance->getChildNodesFromContent($html);
$this->assertEquals(count($nodes), 3);
$this->assertInstanceOf('\simple_html_dom\simple_html_dom_node', $nodes[0]);
}
Expand Down

0 comments on commit f502835

Please sign in to comment.