資源追蹤PHP類庫
<?php namespace Lurker\Tests\Event; use Lurker\Resource\FileResource; use Lurker\Resource\DirectoryResource; use Lurker\Event\FilesystemEvent; use Lurker\Resource\TrackedResource; class FilesystemEventTest extends \PHPUnit_Framework_TestCase { public function testConstructAndGetters() { $event = new FilesystemEvent( $tracked = new TrackedResource(23, new DirectoryResource(__DIR__)), $resource = new FileResource(__FILE__), $type = FilesystemEvent::MODIFY ); $this->assertSame($tracked, $event->getTrackedResource()); $this->assertSame($resource, $event->getResource()); $this->assertSame($type, $event->getType()); } public function testIsFileChange() { $event = new FilesystemEvent( $tracked = new TrackedResource(23, new DirectoryResource(__DIR__.'/../')), $resource = new FileResource(__FILE__), $type = FilesystemEvent::MODIFY ); $this->assertTrue($event->isFileChange()); $this->assertFalse($event->isDirectoryChange()); }
這是一個資源追蹤PHP類別庫,需要的朋友可以下載使用。
免責聲明
本站所有資源皆由網友貢獻或各大下載網站轉載。請自行檢查軟體的完整性!本站所有資源僅供學習參考。請不要將它們用於商業目的。否則,一切後果都由您負責!如有侵權,請聯絡我們刪除。聯絡方式:admin@php.cn
相關文章
整合了前面的PHP資料庫連線類別~~做成一個分頁類別!_PHP教程
21 Jul 2016
整合了前面的PHP資料庫連線類別~~做成一個分頁類別!。不知道學PHP有沒有前途~哎越寫越沒勁?php Classcreatedb//類的開始{ var$db="localhost";//資料庫位址; var$dbname="root";//用戶名; var$ dbpwd="";//密碼; var$
如何從不同的 PHP 類別正確存取 MySQLi 資料庫連線?
18 Dec 2024
從 PHP 中的其他類別存取 MySQLi 連線從 PHP 5.6 升級到 7.0 時,必須從 MySQL 過渡到 MySQLi。這...
如何僅透過一次資料庫檢索 PHP/MySQL 中的分層類別資料?
23 Oct 2024
本文介紹了一種在 PHP/MySQL 中使用鄰接清單模型儲存分層資料(例如類別和子類別)的方法。它提出了一種一次性資料檢索演算法,可以使用單一資料有效地獲取分層資料。
Hot Tools
熱門文章
崩壞:星穹鐵道 - 所有金色替罪羊謎題解決方案
18 Jan 2025
手游攻略
Tales Of Graces F 重製版:所有鎖定的寶箱密碼
18 Jan 2025
手游攻略
魯馬島:考古學家職業指南
03 Jan 2025
手游攻略
如何修復 KB5049622 在 Windows 11 中安裝失敗的問題?
15 Jan 2025
故障排查
魯瑪島:所有魯瑪蛋地點
05 Jan 2025
手游攻略