SmokeTest.php 485 B

12345678910111213141516171819202122232425
  1. <?php
  2. namespace Tests;
  3. use WP_SQLite_DB\wpsqlitedb;
  4. class SmokeTest extends TestCase {
  5. /** @test */
  6. function it_works() {
  7. global $wpdb;
  8. $this->assertInstanceOf( wpsqlitedb::class, $wpdb );
  9. // Do something that triggers a database query.
  10. $this->assertCount( 0, get_posts() );
  11. $this->factory()->post->create();
  12. $this->assertCount( 1, get_posts() );
  13. }
  14. /** @test */
  15. function it_rolls_back_between_tests_successfully() {
  16. $this->assertCount( 0, get_posts() );
  17. }
  18. }