예제 #1
3
 /**
  * Locates a fixture and returns the Package
  *
  * @param string $name Partial path to fixture
  *
  * @return Package
  */
 public function getFixtureEpub($name)
 {
     $fixture = $this->getFixturePath($name);
     $reader = new Reader();
     $epub = $reader->load($fixture);
     return $epub;
 }
예제 #2
3
<?php

require_once __DIR__ . '/../bootstrap.php';
use ePub\Reader;
use ePub\Loader\ZipFileLoader;
$reader = new Reader();
$epub = $reader->load($argv[1]);
printf("Title: %s\n", $epub->getMetadata()->get('title'));
예제 #3
2
 public function testReadingManifestItemContent()
 {
     $fixture = $this->getFixturePath('the_velveteen_rabbit.epub');
     $reader = new Reader();
     $epub = $reader->load($fixture);
     $manifest = $epub->getManifest();
     $dedication = $manifest->get('dedication');
     $expected = $this->getFixture('the-velveteen-rabbit/' . $dedication->href);
     $this->assertEquals($expected, $dedication->getContent());
 }