Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
murdercode committed Mar 2, 2024
2 parents 0cfde18 + af294d7 commit 53025a7
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
[![Github PHPStan](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/phpstan.yml?branch=main&label=phpstan&style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3Aphpstan+branch%3Amain)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/the-3labs-team/laravel-readability/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/the-3labs-team/laravel-readability/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Maintainability](https://api.codeclimate.com/v1/badges/0fcf8cc60952fcc6d286/maintainability)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/maintainability)
[![Test Coverage](https://api.codeclimate.com/v1/badges/0fcf8cc60952fcc6d286/test_coverage)](https://codeclimate.com/github/The-3Labs-Team/laravel-readability/test_coverage)
![License Mit](https://img.shields.io/github/license/murdercode/laravel-shortcode-plus)
[![Total Downloads](https://img.shields.io/packagist/dt/the-3labs-team/laravel-readability.svg?style=flat-square)](https://packagist.org/packages/the-3labs-team/laravel-readability)

Expand Down
6 changes: 6 additions & 0 deletions tests/ReadabilityTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
->and($images)->toContain('/static/img/bitcoin/privacy.svg');
});

it('can parse and get the direction', function () {
$html = file_get_contents(__DIR__.'/fixtures/demo.html');
$direction = Readability::parse($html)->getDirection();
expect($direction)->toBe('ltr');
});

it('can parse and get the content', function () {
$html = file_get_contents(__DIR__.'/fixtures/demo.html');
$readability = Readability::parse($html);
Expand Down
2 changes: 1 addition & 1 deletion tests/fixtures/demo.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h4>October 31, 2008</h4>


</div>
<div id="CONTENT" class="doc-content"><h2 id="abstract"><a href="#abstract">Abstract</a></h2>
<div id="CONTENT" class="doc-content" dir="ltr"><h2 id="abstract"><a href="#abstract">Abstract</a></h2>

<p>A purely peer-to-peer version of electronic cash would allow online payments to be sent directly from one party to another without going through a financial institution.

Expand Down

0 comments on commit 53025a7

Please sign in to comment.