From 90ee76e84b52cf14504b83a20be8a994115896a5 Mon Sep 17 00:00:00 2001
From: jrfnl <jrfnl@users.noreply.github.com>
Date: Tue, 20 Jul 2021 11:20:07 +0200
Subject: [PATCH 2/2] Build/Tests: use more appropriate assertions [2]
PHPUnit has a build in assertion to verify that a directory exists. Let's use it.
---
tests/phpunit/tests/theme.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php
index 7de707e3fe..bf59831e4c 100644
a
|
b
|
class Tests_Theme extends WP_UnitTestCase_Base { |
158 | 158 | $this->assertFileIsReadable( $dir . $file ); |
159 | 159 | } |
160 | 160 | |
161 | | $this->assertTrue( is_dir( $dir . $theme['Template Dir'] ) ); |
162 | | $this->assertTrue( is_dir( $dir . $theme['Stylesheet Dir'] ) ); |
| 161 | $this->assertDirectoryExists( $dir . $theme['Template Dir'] ); |
| 162 | $this->assertDirectoryExists( $dir . $theme['Stylesheet Dir'] ); |
163 | 163 | |
164 | 164 | $this->assertSame( 'publish', $theme['Status'] ); |
165 | 165 | |