function testFile2()
 {
     $parser = new Parser(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "schema2.html"), "http://example.com");
     $events = $parser->getEvents();
     $this->assertEquals(2, count($events));
     ############################### Event
     $event1 = $events[0];
     $this->assertEquals("TechMeetup Edinburgh", $event1->getTitle());
     $this->assertEquals(1, $event1->getUrlsCount());
     $this->assertEquals("http://example.com/event/2595-techmeetup-edinburgh", $event1->getUrls()[0]->getUrl());
     $this->assertNotNull($event1->getStart());
     $this->assertEquals("2015-07-08T18:30:00+01:00", $event1->getStart()->format("c"));
     $this->assertEquals("+01:00", $event1->getStart()->getTimezone()->getName());
     $this->assertNull($event1->getEnd());
     $this->assertEquals("Welcoming anyone involved or working in technology.  TechMeetup is a monthly excuse for developers and the tech community around Scotland to meet up and learn new stuff from each other. No name badges, no sales pitches, just informative presentations from your peers and a chance to meet some of the tech community around you.  We're not centred around specific languages, technologies or disciplines; we believe there's stuff to learn from mixing everyone together. There's no cost to attend, and food and drink are provided.", $event1->getDescriptionText());
     $this->assertEquals("Welcoming anyone involved or working in technology.<br /> <br /> TechMeetup is a monthly excuse for developers and the tech community around Scotland to meet up and learn new stuff from each other. No name badges, no sales pitches, just informative presentations from your peers and a chance to meet some of the tech community around you.<br /> <br /> We&#039;re not centred around specific languages, technologies or disciplines; we believe there&#039;s stuff to learn from mixing everyone together. There&#039;s no cost to attend, and food and drink are provided.", $event1->getDescriptionHtml());
     ############################### Event
     $event2 = $events[1];
     $this->assertEquals("TechMeetup Edinburgh", $event2->getTitle());
     $this->assertEquals(1, $event2->getUrlsCount());
     $this->assertEquals("http://example.com/event/2596-techmeetup-edinburgh", $event2->getUrls()[0]->getUrl());
     $this->assertNotNull($event2->getStart());
     $this->assertEquals("2015-08-12T18:30:00+01:00", $event2->getStart()->format("c"));
     $this->assertEquals("+01:00", $event2->getStart()->getTimezone()->getName());
     $this->assertNull($event2->getEnd());
     $this->assertEquals("Welcoming anyone involved or working in technology.  TechMeetup is a monthly excuse for developers and the tech community around Scotland to meet up and learn new stuff from each other. No name badges, no sales pitches, just informative presentations from your peers and a chance to meet some of the tech community around you.  We&#039;re not centred around specific languages, technologies or disciplines; we believe there&#039;s stuff to learn from mixing everyone together. There&#039;s no cost to attend, and food and drink are provided.", $event2->getDescriptionText());
     $this->assertEquals("Welcoming anyone involved or working in technology.<br /> <br /> TechMeetup is a monthly excuse for developers and the tech community around Scotland to meet up and learn new stuff from each other. No name badges, no sales pitches, just informative presentations from your peers and a chance to meet some of the tech community around you.<br /> <br /> We&#039;re not centred around specific languages, technologies or disciplines; we believe there&#039;s stuff to learn from mixing everyone together. There&#039;s no cost to attend, and food and drink are provided.", $event2->getDescriptionHtml());
 }
 function testFile1()
 {
     $parser = new Parser(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "both1.html"), "http://example.com");
     $events = $parser->getEvents();
     $this->assertEquals(1, count($events));
     ############################### Event
     $event1 = $events[0];
     $this->assertEquals("IndieWebCamp 2015", $event1->getTitle());
     $this->assertEquals(1, $event1->getUrlsCount());
     $this->assertEquals("http://indiewebcamp.com/2015", $event1->getUrls()[0]->getUrl());
     $this->assertNotNull($event1->getStart());
     $this->assertEquals("2015-07-11T16:30:00+00:00", $event1->getStart()->format("c"));
     $this->assertEquals("+00:00", $event1->getStart()->getTimezone()->getName());
     $this->assertNotNull($event1->getEnd());
     $this->assertEquals("2015-07-11T16:30:00+00:00", $event1->getEnd()->format("c"));
     $this->assertEquals("+00:00", $event1->getEnd()->getTimezone()->getName());
     $this->assertNull($event1->getDescriptionHtml());
     $this->assertNull($event1->getDescriptionText());
 }
 function testFile2()
 {
     $parser = new Parser(file_get_contents(__DIR__ . DIRECTORY_SEPARATOR . "data" . DIRECTORY_SEPARATOR . "hevent2.html"), "http://example.com");
     $events = $parser->getEvents();
     $this->assertEquals(1, count($events));
     ############################### Event
     $event1 = $events[0];
     $this->assertEquals("Homebrew Website Club", $event1->getTitle());
     $this->assertEquals(2, $event1->getUrlsCount());
     $this->assertEquals("http://indiewebcamp.com/events/2015-07-15-homebrew-website-club", $event1->getUrls()[0]->getUrl());
     $this->assertEquals("https://aaronparecki.com/events/2015/07/15/1/homebrew-website-club", $event1->getUrls()[1]->getUrl());
     $this->assertNotNull($event1->getStart());
     $this->assertEquals("2015-07-15T17:30:00-07:00", $event1->getStart()->format("c"));
     $this->assertEquals("-07:00", $event1->getStart()->getTimezone()->getName());
     $this->assertNotNull($event1->getEnd());
     $this->assertEquals("2015-07-15T19:30:00-07:00", $event1->getEnd()->format("c"));
     $this->assertEquals("-07:00", $event1->getEnd()->getTimezone()->getName());
     $this->assertNull($event1->getDescriptionHtml());
     $this->assertNull($event1->getDescriptionText());
 }