- Add videodb PHP/MySQL media collection manager (Blu-ray, DVD, CD) - Dockerfile: PHP 8.1 + Apache with GD/mysqli/exif extensions - docker-compose.yml: app on port 6761 + MySQL 8.0 with health checks - docker-entrypoint.sh: auto-generates config.inc.php from env vars, waits for MySQL, initializes DB schema idempotently - init-db.php: CLI schema installer using app's own prefix_query() logic - Persistent volumes for DB, cache, and cover images Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
61 lines
1.7 KiB
PHP
61 lines
1.7 KiB
PHP
<?php
|
|
/**
|
|
* test_amazon.php
|
|
*
|
|
* amazon.de engine test case
|
|
*
|
|
* @package Test
|
|
* @author Andreas Götz <cpuidle@gmx.de>
|
|
* @version $Id: test_amazonaws.php,v 1.4 2013/02/02 11:38:59 andig2 Exp $
|
|
*/
|
|
|
|
require_once './core/functions.php';
|
|
require_once './engines/engines.php';
|
|
|
|
class TestAmazonAWS extends UnitTestCase
|
|
{
|
|
function TestAmazonAWS()
|
|
{
|
|
parent::__construct();
|
|
}
|
|
|
|
function testData()
|
|
{
|
|
// Star Wars: Episode 1
|
|
// http://www.amazon.de/Star-Wars-Episode-Bedrohung-Einzel-DVD/dp/B0009HBEHW/ref=sr_1_2/303-6664842-9566627?ie=UTF8&s=dvd&qid=1185389090&sr=1-2
|
|
$id = 'B0009HBEHW';
|
|
|
|
$data = engineGetData($id, 'amazonaws');
|
|
#$this->assertNoErrors();
|
|
|
|
$this->assertTrue(sizeof($data) > 0);
|
|
|
|
# dump($data);
|
|
|
|
$this->assertPattern('/Star Wars/', $data[title]);
|
|
# $this->assertEqual($data[subtitle], 'Die dunkle Bedrohung (Einzel-DVD)');
|
|
$this->assertPattern('#http://.+.images\-amazon.com/images/#', $data[coverurl]);
|
|
$this->assertEqual($data[director], 'George Lucas');
|
|
$this->assertEqual($data[language], 'deutsch, englisch');
|
|
$this->assertEqual($data[year], 2001);
|
|
$this->assertTrue($data[runtime] > 100);
|
|
$this->assertTrue($data[rating] >= 6);
|
|
#[genres] =>
|
|
$this->assertPattern('/Ewan McGregor/', $data[cast]);
|
|
$this->assertPattern('/Naboo/', $data[plot]);
|
|
}
|
|
|
|
function testSearch()
|
|
{
|
|
$id = 'Star Wars: Episode 1';
|
|
|
|
$data = engineSearch($id, 'amazonaws', 'DVD', 'com');
|
|
#$this->assertNoErrors();
|
|
$this->assertTrue(sizeof($data) > 0);
|
|
|
|
# dump($data);
|
|
}
|
|
}
|
|
|
|
?>
|