Open-source social media scheduler built for AI agents and the teams behind them. Create, schedule and publish posts to every network through MCP or the REST API, or write them yourself in a composer your team will love.
PHP ai-agentsblueskyfacebookinstagramlaravellinkedinmastodonmcpmcp-serveropen-sourcerest-apiself-hostedsocial-mediasocial-media-managementsocial-media-schedulerthreadstiktokvuejsxyoutube
<?php
declare(strict_types=1);
use App\Models\Post;
use App\Support\Social\GoogleBusinessDerivativeCleaner;
use Illuminate\Support\Facades\Storage;
test('it deletes the managed google business jpeg for a post', function () {
Storage::fake();
$post = Post::factory()->make(['id' => '123e4567-e89b-12d3-a456-426614174000']);
$path = GoogleBusinessDerivativeCleaner::pathFor($post);
Storage::put($path, 'image');
Storage::put('uploads/keep.jpg', 'keep');
app(GoogleBusinessDerivativeCleaner::class)->cleanup($post);
expect($path)->toEndWith('/123e4567-e89b-12d3-a456-426614174000.jpg');
Storage::assertMissing($path);
Storage::assertExists('uploads/keep.jpg');
});
test('it no-ops when the derivative is already gone', function () {
Storage::fake();
app(GoogleBusinessDerivativeCleaner::class)->cleanup(Post::factory()->make(['id' => '123e4567-e89b-12d3-a456-426614174000']));
expect(Storage::allFiles())->toBe([]);
});