Added WooCommerce events.

Fixes #29
This commit is contained in:
Andrey Savchenko committed 2019-01-22 16:14:14 +02:00
1 parent ad246ad1bc
commit 15ff72afb0
4 files changed
+48 -5

No files matched your search

+14
View File
@@ -7,6 +7,7 @@ use Rarst\Laps\Event\Core_Events;
use Rarst\Laps\Event\Genesis_Events;
use Rarst\Laps\Event\Hybrid_Events;
use Rarst\Laps\Event\THA_Events;
use Rarst\Laps\Event\WooCommerce_Events;
use Rarst\Laps\Event\Yoast_Events;
use Rarst\Laps\Tests\LapsTestCase;
@@ -62,6 +63,19 @@ class EventTest extends LapsTestCase {
$this->assertNotEmpty( $events );
}
public function testWooCommerce() {
$woocommerce = new WooCommerce_Events();
$this->assertEmpty( $woocommerce->get_events() );
$this->getMockBuilder( 'WooCommerce' )->allowMockingUnknownTypes()->getMock();
$events = $woocommerce->get_events();
$this->assertInternalType( 'array', $events );
$this->assertNotEmpty( $events );
}
public function testYoast() {
$yoast = new Yoast_Events();