Conditions | 1 |
Paths | 1 |
Total Lines | 18 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function setUp(): void |
||
30 | { |
||
31 | $this->feedDir = __DIR__ . '/feeds'; |
||
32 | $this->goodAtom = \file_get_contents($this->feedDir . '/test.atom'); |
||
33 | |||
34 | $middleware = (new HandlerStack()) |
||
35 | ->append(new Atom(), 'atom'); |
||
36 | |||
37 | $this->simplepie = (new SimplePie()) |
||
38 | ->setMiddlewareStack($middleware); |
||
39 | |||
40 | //------------------------------------------------------------------------------ |
||
41 | |||
42 | $stream = Psr7\stream_for($this->goodAtom); |
||
43 | $parser = $this->simplepie->parseXml($stream, true); |
||
44 | |||
45 | $this->feed = $parser->getFeed(); |
||
46 | } |
||
47 | } |
||
48 |